﻿@using CommandLib
@using FindArtInfo.Models
@using Resources
@model PageSignaturesPicturesModel
@{
    ViewBag.Title = "Artist's Signatures - " + HttpUtility.HtmlDecode(Model.SignaturesSelected != null ? Model.SignaturesSelected.FullName : string.Empty);
    Layout = "~/Views/Shared/_Layout.cshtml";
}
    <h1 class='underline'>@Multi.PageSignaturesPicturesTitle</h1>
    @Html.Raw(Multi.PageSignaturesPicturesMessage)<br><br>
    @if (Model.Order != null && Model.Order == Constants.Order.ASC)
    {
        <p align="right"><b>@string.Format(Multi.PageSignaturesPicturesPaging, Utils.FomatNumber(Model.PageIndex.ToString()), Utils.FomatNumber(Model.TotalPage.ToString()))</b></p>
    }
    else
    {
        <p align="right"><b>@string.Format(Multi.PageSignaturesPicturesPaging, Utils.FomatNumber((Model.TotalPage - Model.PageIndex + 1).ToString()), Utils.FomatNumber(Model.TotalPage.ToString()))</b></p>
    }
	<br/>
    <center>
	<table>
            <tr>
                <td style="VERTICAL-ALIGN: top; TEXT-ALIGN: left"  vAlign=top align=middle>
                    @if(Model.SignaturesSelected != null)
                    {                        
                        <a href='~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/list-prices-by-artist/@Model.SignaturesSelected.ArtistID/@(Utils.UnicodeToKoDauAndGach(Model.SignaturesSelected.FullName)).html'>
                            @string.Format(Multi.PageSignaturesPicturesArtistName, HttpUtility.HtmlDecode(Model.SignaturesSelected.FullName))
                        </a>
                    }
                </td>
            </tr>
            <tr>
            <td valign="top" align="left" style="vertical-align: top; text-align: left;">
                <div id="fb-root"></div>
				<script>(function(d, s, id) {
				  var js, fjs = d.getElementsByTagName(s)[0];
				  if (d.getElementById(id)) return;
				  js = d.createElement(s); js.id = id;
				  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0";
				  fjs.parentNode.insertBefore(js, fjs);
				}(document, 'script', 'facebook-jssdk'));</script>
				<div class="fb-like" data-href="@HttpContext.Current.Request.RawUrl" data-layout="button_count" data-action="like" data-show-faces="true" data-share="true"></div>
                <!-- Place this tag in your head or just before your close body tag. -->
                <script src="https://apis.google.com/js/platform.js" async defer></script>
                <!-- Place this tag where you want the +1 button to render. -->
                <div class="g-plusone" data-size="medium"></div>
		        <br/>
            </td>
            </tr>
            <tr>
                <td style="VERTICAL-ALIGN: middle;TEXT-ALIGN: center" vAlign=center align=middle>
                    @if (Model.SignaturesSelected != null)
                    {
                        string urlImage = Utils.GetUrlImage(Model.SignaturesSelected.Signature);
                        string alt = string.Format("Artist {0} - FindArtinfo", Model.SignaturesSelected.FullName);
                        ViewBag.Image = urlImage;
                        <a class="APCAnchor" title="@string.Format(Multi.PageSignaturesPicturesClickHereToShort, HttpUtility.HtmlDecode(Model.SignaturesSelected.FullName))" 
                           href='~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/list-prices-by-artist/@Model.SignaturesSelected.ArtistID/@(Utils.UnicodeToKoDauAndGach(Model.SignaturesSelected.FullName)).html'>
                            <img src="@urlImage" border="0" alt="@alt" />
                        </a>
                    }
                </td>
            </tr>
    </table>
    </center>
	<br/>
    <hr/>
    <table cellspacing="0" cellpadding="2"  width="100%" >
        <tr>
            <td align="left">                                                                         			                
                @for (int i =0 ;i < Model.ListSignatures.Count;i++)
                {                         
                    var item1 = Model.ListSignatures[i];                          
                    <table style="margin-left: 10px; float: left" cellspacing="0" cellpadding="0" width="169px" border="0">
                        <tr>
                            <td style="vertical-align: top; text-align: left; height: 30px"  valign=top align=middle >                                
                                <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/list-prices-by-artist/@(item1.ArtistID)/@(Utils.UnicodeToKoDauAndGach(item1.FullName)).html">@string.Format(Multi.PageSignaturesPicturesArtistName, HttpUtility.HtmlDecode(item1.FullName))</a>
                            </td>
                        </tr>
                        <tr>
                            <td style="vertical-align: middle; height: 105px; text-align: center" valign=center align=middle height=105>                                                                                        
                                @{ 
                                    string urlImage1 = Utils.GetUrlImage(item1.Signature);
                                    string alt = string.Format("Artist {0} - FindArtinfo", item1.FullName);
                                   }
                                <a title="@string.Format(Multi.PageSignaturesPicturesClickHereToShort, HttpUtility.HtmlDecode(item1.FullName))"                                    
                                   href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/@i/@(Model.Order == null ? 0 : Model.Order)/artist-signatures/page/@(Model.PageIndex).html">
                                    <img src="@urlImage1" border="0" width="170" height="80" alt="@alt"/>
                                </a>
                            </td>
                        </tr>													  
                    </table>
                }                                                                                                                                                 
            </td>            
        </tr>        
        <tr height="35px">
            <td colspan="7" align="center">
                <center>
                    <b>@Multi.PageSignaturesPicturesGotoPage</b>
                    @if (Model.Order != null && Model.Order == Constants.Order.ASC)
                    {
                        @Html.Partial("_PartialPagingOldPictures", new PartialPagingModel { PageIndex = Model.PageIndex, PageSize = Model.PageSize, TotalPage = Model.TotalPage, TotalRecord = Model.TotalRecord, Url = Model.Url })                        
                    }
                    else
                    {
                        @Html.Partial("_PartialPagingNewPictures", new PartialPagingModel { PageIndex = Model.PageIndex, PageSize = Model.PageSize, TotalPage = Model.TotalPage, TotalRecord = Model.TotalRecord, Url = Model.Url })
                    }
                </center>
            </td>
        </tr>       
        <tr>
            <td colspan="7" align="center">
            @if (Model.Order != null && Model.Order == Constants.Order.ASC)
            {                                
                <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/0/0/artist-signatures/page/@(Model.TotalPage).html">@Multi.PageSignaturesPicturesSortNewInput</a>
            }
            else
            {                                
                <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/0/1/artist-signatures/page/1.html">@Multi.PageSignaturesPicturesSortOldInput</a>
            } 
            </td>
        </tr>
    </table>
